﻿using System.Collections.Generic;
using Dsl.Ped.AddIn.Java.Resources;
using Dsl.Ped.Framework.Common;
using Dsl.Ped.AddIn.Java.Generated.Interfaces;
using Dsl.Ped.Framework.Projections;

namespace Dsl.Ped.AddIn.Java.Generated 
{
    /// <summary>
    /// This is the class that enhances the <see cref="Parameter"/> class 
    /// provided in the model of projections, these are organized into containers
    /// </summary>
    public partial class Parameter : IProjective, IVariable 
    {        
        public List<IProjectionContainer> GetProjectionContainers() {

            List<IProjectionContainer> projectionContainers = new List<IProjectionContainer>();
            projectionContainers.Add(new ProjectionContainer("Field")
                .RegisterProjection("full", LayoutProjectionFactory.GetStackPanelProjection(
                    ValueProjectionFactory.GetComboBoxProjection(this, () => type, JavaResources.DataTypes),
                    ValueProjectionFactory.GetTextBoxProjection(this, () => name))));
            projectionContainers.Add(new ProjectionContainer("FreeField")
                .RegisterProjection("freeField", ValueProjectionFactory.GetTextBoxProjection(this, () => name)));
            return projectionContainers;
        }
    }
}
